<template>
  <!-- 旧版本：dv-border-box-8 -->
  <dv-border-box-7 class="line_titles" :reverse="reverse" :color="['#1a2e79', '#00fcf9']" backgroundColor="#041230">
    <div class="item_title" v-if="title !== ''">
      <div class="zuo"></div>
      <span class="title-inner">{{ title }}</span>
      <div class="you"></div>
    </div>
    <div :class="title !== '' ? 'item_title_content' : 'item_title_content_def'">
      <slot></slot>
    </div>
  </dv-border-box-7>
</template>

<script>
export default {
  data() {
    return {}
  },
  props: {
    title: {
      type: String,
      default: () => '',
    },
    reverse: {
      type: Boolean,
      default: () => false
    }
  },
  created() {},

  mounted() {},
  methods: {},
}
</script>
<style lang="less" scoped>
// $item-title-height: 38px;
// $item_title_content-height: calc(100% - 38px);
.line_titles {
  box-sizing: border-box;

  :deep(.border-box-content) {
    box-sizing: border-box;
    padding: 6px 16px 0px;
  }

  .item_title {
    height: 40px;
    line-height: 38px;
    color: #31abe3;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #081B47;

    .zuo,
    .you {
      width: 58px;
      height: 14px;
      background-image: url('../../assets/image/titles/zuo.png');
    }

    .you {
      transform: rotate(180deg);
    }
    .title-inner {
      padding: 0 8px;
      font-weight: 900;
      letter-spacing: 2px;
      color: #fff;
      // background: linear-gradient(92deg, #0072ff 0%, #00eaff 48.8525390625%, #01aaff 100%);
      // -webkit-background-clip: text;
      // -webkit-text-fill-color: transparent;
    }
  }

  .item_title_content {
    height: calc(100% - 38px);
  }

  .item_title_content_def {
    width: 100%;
    height: 100%;
  }
}
</style>
